package com.blog.common.domain.dto;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.util.List;
import java.util.stream.Collectors;

/**
 * <p>
 * 相片-上传
 * </p>
 *
 * @author Valerie
 * @date 2023/6/4
 **/
@Data
public class PhotoUploadDto {
    /** 相册id */
    private Long albumId;
    private List<String> photoUrlList;
    private List<String> photoNameList;

    public void setPhotoUrlList(List<String> photoUrlList) {
        photoUrlList = photoUrlList.stream().filter(StringUtils::isNoneBlank).collect(Collectors.toList());
        this.photoUrlList = photoUrlList;
    }

    public void setPhotoNameList(List<String> photoNameList) {
        photoNameList = photoNameList.stream().filter(StringUtils::isNoneBlank).collect(Collectors.toList());
        this.photoNameList = photoNameList;
    }
}
